package lzzy.net.repository;

import lzzy.net.entity.Comment;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import javax.transaction.Transactional;

public interface CommentRepository extends JpaRepository<Comment,Integer> {
   @Transactional
   @Modifying

    @Query(value ="UPDATE t_comment SET content = ?2 where id = ?1",nativeQuery = true)
    public int updateComment(Integer id , String  content);
}
